
//Estrutura para concatenação de símbolos
typedef struct grammarSymbolConcat
{
	char symbolName[40];
	struct grammarSymbolConcat *nextSymbol;
}
grammarSymbolElemment, *grammarSymbolsList;

//Estrutura para união das derivações
typedef struct grammarSymbolUnion
{
	grammarSymbolsList concatDerivation;
	struct grammarSymbolUnion *next;
}
grammarUnionElemment, *rightSideGrammarDerivation;

typedef struct grammarElemment
{
	char symbolName[40];
	rightSideGrammarDerivation rDerivation;
	struct grammarElemment *next;
}
grammarDerivationElemment, *grammarDerivationsList;

/* ListFunctions */
void printGrammarList(grammarSymbolsList g);
void addGrammarSymbolsList(grammarSymbolsList *g, char symbolName[]);
void printUnion(rightSideGrammarDerivation r);
void addUnion(rightSideGrammarDerivation *r, grammarSymbolsList l);
void printGrammarDerivations(grammarDerivationsList g);
void addGrammarDerivation(grammarDerivationsList *g, rightSideGrammarDerivation r,
	char firstSymbolName[]);


//Functions
void removeSimpleLeftRec(grammarDerivationsList *g, char symbolName[]);	
void subOperation(grammarDerivationsList *s1, grammarDerivationsList *s2);
